//逻辑设计
const app = getApp()
Page({
  data: {
    active:[0],
    //切换
    cardTwo1: [{
            text: "恭喜发财",
            img: "https://636c-cloud2-9gomot6xb9909364-1305292962.tcb.qcloud.la/%E8%BD%AE%E7%95%AA%E5%9B%BE/pic2.jpg?sign=66380c3e9e69c7b7ea41b3275b21a1a6&t=1633970047"
          },
        ],
      
    cardTwo2: [{
          text: "学习进步",
          img: "https://636c-cloud2-9gomot6xb9909364-1305292962.tcb.qcloud.la/%E8%BD%AE%E7%95%AA%E5%9B%BE/pic1.jpg?sign=36f00fa2de3075a94034b91c8a433ed2&t=1633970023"
          },
        ],
      
      titles_choose:["精选名著","经典名著","非常经典",],
      content_1:[{
        img: "https://636c-cloud2-9gomot6xb9909364-1305292962.tcb.qcloud.la/%E8%BD%AE%E7%95%AA%E5%9B%BE/pic3.jpg?sign=7b6ce56545a6e02f7b91e66733452784&t=1633970060"
      },
      {
        img: "https://636c-cloud2-9gomot6xb9909364-1305292962.tcb.qcloud.la/%E8%BD%AE%E7%95%AA%E5%9B%BE/pic4.jpg?sign=4633ac05e0eb85ac6ba6c3fba5bafa79&t=1633970071"
      },
      {
        img: "https://636c-cloud2-9gomot6xb9909364-1305292962.tcb.qcloud.la/%E8%BD%AE%E7%95%AA%E5%9B%BE/pic6.jpg?sign=151255c6f84a122156139fe4fd1f5e87&t=1633970085"
      }
    ],
      content_2:[{
        name:"“昨夜西风凋碧树，独上高楼，望尽天涯路。”  “ 衣带渐宽终不悔，为伊消得人憔悴。”  “ 众里寻他千百度，蓦然回首，那人却在，灯火阑珊处。”",
      }],
      content_3:[{
        name:"孩儿立志出乡关，学不成名誓不还。埋骨何须桑梓地，人生无处不青山。",
      }]
  },
//功能列表
change:function(e){
  this.setData({
    active:e.currentTarget.dataset.index
  })
},
goToDetail:function(e){
  //获取携带data-id的数据
  let id = e.currentTarget.dataset.id
  //console.log(e)
  //携带新闻ID进行页面跳转
  wx.navigateTo({
    url: '../inside/total/total?id=' + id,
  })

},
//生命周期函数
onLoad: function (options) {
  // let list = common.getNewList()
  // this.setData({
  //   newsList:list
  // })
}
})
